Multiple dispatch in reflective runtime environment

نویسندگان

  • Rajeev Kumar
  • Vikram Agrawal
چکیده

Message dispatch in object-oriented programming (OOP) involves target method lookup in dispatch table/tree. Reflective environment builds dispatch data-structure at runtime as types can be added at runtime. Hence, algorithms for reflective environments require dynamic data structure for dispatch. In this paper, we propose a tree-based algorithm for multiple dispatch in reflective runtime environment. New classes can be added to the system at runtime. Proposed algorithm performs lookup in time proportional to log(n) times the polymorphic arguments, where n is number of classes in a system. Proposed algorithm uses type-safe approach for multimethod lookup resolving ambiguities. We compare performance of the proposed algorithm with the dispatch mechanism in commonly used virtual/reflexive systems, e.g., Java and Microsoft’s Common Language Runtime (MS-CLR), in respect of efficiency and type-safety. © 2005 Elsevier Ltd. All rights reserved.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Incremental Table-Based Method Dispatch for Reflective Object-Oriented Languages

A collection of algorithms and data structures are presented which provide incremental dispatch table modification. Incrementally modified dispatch tables allow table-based dispatch techniques to be used in reflective, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally main...

متن کامل

Inheritance Management and Method Dispatch in Reeexive Object-oriented Languages

A collection of algorithms and data structures are presented which represent a generalized framework for inheritance management and method dispatch in reeexive, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally maintain the entire dispatch environment during the four funda...

متن کامل

Attaining multiple dispatch in widespread object-oriented languages

Multiple dispatch allows determining the actual method to be executed, depending on the dynamic types of its arguments. Although some programming languages provide multiple dispatch, most widespread object-oriented languages lack this feature. Therefore, different implementation techniques are commonly used to obtain multiple dispatch in these languages. We evaluate the existing approaches, pre...

متن کامل

Partial Dispatch: Optimizing Dynamically-Dispatched Multimethod Calls with Compile-Time Types and Runtime Feedback

Dylan is an object-oriented language with a combination of features that present both difficulties and opportunities for efficient compilation. The language is thoroughly objectoriented and supports multimethod dispatch as well as dynamic typing. The semantics of the language are consistently defined in terms of a program runtime model. However, the design goals included providing significant o...

متن کامل

Adaptive Off-Line Tuning for Optimized Composition of Components for Heterogeneous Many-Core Systems

In recent years heterogeneous multi-core systems have been given much attention. However, performance optimization on these platforms remains a big challenge. Optimizations performed by compilers are often limited due to lack of dynamic information and run time environment, which makes applications often not performance portable. One current approach is to provide multiple implementations for t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Computer Languages, Systems & Structures

دوره 33  شماره 

صفحات  -

تاریخ انتشار 2007